// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.spnetwork;

import java.nio.ByteBuffer;
import zombie.network.IZomboidPacket;

public final class ZomboidNetData implements IZomboidPacket {
    public short type;
    public short length;
    public ByteBuffer buffer;
    public UdpConnection connection;

    public ZomboidNetData() {
        this.buffer = ByteBuffer.allocate(2048);
    }

    public ZomboidNetData(int size) {
        this.buffer = ByteBuffer.allocate(size);
    }

    public void reset() {
        this.type = 0;
        this.length = 0;
        this.buffer.clear();
        this.connection = null;
    }

    public void read(short id, ByteBuffer bb, UdpConnection _connection) {
        this.type = id;
        this.connection = _connection;
        this.buffer.put(bb);
        this.buffer.flip();
    }

    @Override
    public boolean isConnect() {
        return false;
    }

    @Override
    public boolean isDisconnect() {
        return false;
    }
}
